import axios from 'axios';

var instance = axios.create({
	headers: {'Content-Type': 'application/x-www-form-urlencoded'}
});
//
instance.defaults.headers.common['token'] = sessionStorage.token;
//axios.defaults.headers.post['Content-Type'] = 'application/json;';


// 设置请求根域名
export default {
    install:function(Vue){
        // 将$http 绑定到Vue.prototype上 并且该属性为只读
        Object.defineProperty(Vue.prototype, '$axios', { value: axios });
    }
}